﻿<%@ Page Title="" Language="C#" MasterPageFile="~/IdeaNMR/IdeaNMR.master"
    ValidateRequest="false" AutoEventWireup="true"
    CodeBehind="NEWDesignPulseProgram.aspx.cs" Inherits="IdeaNMR.Web.DesignPulseProgram" %>

<%-------------------------------------------------------------------------
All Documentation is in the code behind file except if concerns asp.net controls 
---------------------------------------------------------------------------%>
<%@ MasterType TypeName="IdeaNMR.Web.IdeaNMR_Master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
    TagPrefix="act" %>
<%@ Register Src="~/IdeaNMR/VersionList.ascx" TagName="VersionsList"
    TagPrefix="nmr" %>
<%@ Register Src="~/IdeaNMR/AuthorList.ascx" TagName="Authors"
    TagPrefix="nmr" %>
<%@ Register Src="~/IdeaNMR/ComponentList.ascx" TagName="Components"
    TagPrefix="nmr" %>
<%@ Register Src="~/IdeaNMR/SpectrometersTable.ascx"
    TagPrefix="nmr" TagName="SpectrometersTable" %>
<%@ Register Src="~/IdeaNMR/SamplesTable.ascx" TagPrefix="nmr"
    TagName="SamplesTable" %>
<%@ Register Src="~/IdeaNMR/WaveShapesTable.ascx" TagName="WaveShapesTable"
    TagPrefix="nmr" %>
<%@ Register Src="~/IdeaNMR/CpdsTable.ascx" TagName="CpdsTable"
    TagPrefix="nmr" %>
<%@ Register Src="~/IdeaNMR/ScriptsTable.ascx" TagName="ScriptsTable"
    TagPrefix="nmr" %>
<%@ Reference Control="~/IdeaNMR/DisplayBenchmark.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head"
    runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphMaster"
    runat="server">
    <asp:ScriptManagerProxy runat="server" />
    <asp:UpdatePanel ID="upSelection" runat="server">
        <ContentTemplate>
            <asp:Panel runat="server" ID="panSelection" CssClass="DesignPulseProgram_ASPX SelectionTables"
                Visible="false">
                <asp:LinkButton ID="lbClose" runat="server" CssClass="DesignPulseProgram_ASPX CloseSelection"
                    OnClick="CloseSelectionPanel" Text="Close" CausesValidation="false" />
                <asp:MultiView ID="mvTables" runat="server" ActiveViewIndex="0">
                    <asp:View runat="server" ID="vPPs">
                        <input type="button" onclick="window.open('/WaveShape_New.ashx')"
                            value="Add New" class="DesignPulseProgram_ASPX BigButton AddComponent" />
                        <br />
                        <nmr:WaveShapesTable runat="server" ID="WaveShapesTable"
                            CssClass="NMRObjectsTable" Selectable="true" OnSelected="Table_Selected" />
                    </asp:View>
                    <asp:View runat="server" ID="vCpds">
                        <input type="button" onclick="window.open('/Cpd_New.ashx')"
                            value="Add New" class="DesignPulseProgram_ASPX BigButton AddComponent" />
                        <br />
                        <nmr:CpdsTable runat="server" ID="CpdsTable" Selectable="true"
                            OnSelected="Table_Selected" CssClass="NMRObjectsTable" />
                    </asp:View>
                    <asp:View runat="server" ID="vScripts">
                        <input type="button" onclick="window.open('/Script_New.ashx')"
                            value="Add New" class="DesignPulseProgram_ASPX BigButton AddComponent" />
                        <br />
                        <nmr:ScriptsTable runat="server" ID="ScriptsTable"
                            Selectable="true" OnSelected="Table_Selected" CssClass="NMRObjectsTable" />
                    </asp:View>
                    <asp:View runat="server" ID="vSamples">
                        <input type="button" onclick="window.open('/Sample_New.ashx')"
                            value="Add New" class="DesignPulseProgram_ASPX BigButton AddComponent" />
                        <br />
                        <nmr:SamplesTable runat="server" ID="SamplesTable"
                            Selectable="true" OnSelected="SamplesTable_OnSelected"
                            CssClass="SamplesTable" />
                    </asp:View>
                    <asp:View runat="server" ID="vSpectrometers">
                        <input type="button" onclick="window.open('/Spectrometer_New.ashx')"
                            value="Add New" class="DesignPulseProgram_ASPX BigButton AddComponent" />
                        <br />
                        <nmr:SpectrometersTable runat="server" ID="SpectrometersTable"
                            Selectable="true" OnSelected="SpectrometersTable_OnSelected"
                            CssClass="SpectrometersTable" />
                    </asp:View>
                </asp:MultiView>
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="lbClose" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="ComponentsList"
                EventName="AddCommand" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:Panel runat="server" ID="panTwoColumns" CssClass="DesignPulseProgram_ASPX Main">
        <asp:Panel runat="server" ID="panRight" CssClass="DesignPulseProgram_ASPX ControlsContainer">
            <asp:UpdatePanel runat="server" ID="upButtons">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="panButtons" CssClass="DesignPulseProgram_ASPX Control Buttons">
                        <div>
                            <asp:Button runat="server" ID="butSave" Text="Submit"
                                OnClick="butSave_Click" CausesValidation="false"
                                CssClass="DesignPulseProgram_ASPX Control Submit" />
                            <div class="DesignPulseProgram_ASPX SaveDraft">
                                <asp:Button runat="server" ID="butDraft" Enabled="True"
                                    Text="Save Draft" CssClass="DesignPulseProgram_ASPX Buttons SaveDraft"
                                    OnClick="butDraft_Click" CausesValidation="true" />
                                <br />
                                <asp:Label runat="server" ID="lblSysMsg" Text="Not Implemented Yet"
                                    CssClass="DesignPulseProgram_ASPX SaveDraft" Visible="false" />
                            </div>
                            <asp:ValidationSummary runat="server" HeaderText="Validation issues present"
                                DisplayMode="SingleParagraph" ValidationGroup="DefaultGroup"
                                CssClass="DesignPulseProgram_ASPX ValidationSummary" />
                        </div>
                        <asp:Panel runat="server" ID="panSave" CssClass="DesignPulseProgram_ASPX Saving"
                            Visible="false">
                            <div class="DesignPulseProgram_ASPX SaveType">
                                <asp:RadioButton runat="server" ID="rbNew" Text="New Pulse Program"
                                    OnCheckedChanged="rbSaveOption_CheckChanged" CssClass="BadRadioButton"
                                    AutoPostBack="true" GroupName="SaveOption" />
                            </div>
                            <div class="DesignPulseProgram_ASPX SaveType">
                                <asp:RadioButton runat="server" ID="rbVersion" Text="New Version"
                                    OnCheckedChanged="rbSaveOption_CheckChanged" CssClass="BadRadioButton"
                                    AutoPostBack="true" GroupName="SaveOption" />
                                <asp:TextBox runat="server" ID="tbVersionInfo" CssClass="DesignPulseProgram_ASPX UserInputField VersionInfo"
                                    TextMode="MultiLine" Rows="2" Enabled="false" />
                                <div class="DesignPulseProgram_ASPX Validator">
                                    <asp:RegularExpressionValidator runat="server" ID="revVersionInfo"
                                        ControlToValidate="tbVersionInfo" Display="Dynamic"
                                        ValidationGroup="DefaultGroup" />
                                </div>
                            </div>
                            <asp:CheckBox runat="server" ID="chkPublic" Text="Make It Public"
                                CssClass="DesignPulseProgram_ASPX BadCheckBox" />
                            <br />
                            <span><strong>Making Pulse Program public will automatically
                                make all the referenced auxiliary components public
                                too.</strong></span>
                            <div class="DesignPulseProgram_ASPX Validator">
                                <asp:CustomValidator runat="server" Text="Please choose save option."
                                    OnServerValidate="SaveOption_Validate" Display="Dynamic"
                                    ValidationGroup="DefaultGroup" />
                            </div>
                            <span>
                                <asp:Button runat="server" Text="Ok" CssClass="DesignPulseProgram_ASPX BigButton OkButton"
                                    CausesValidation="true" ID="butOk" OnClick="butOk_Click"
                                    ValidationGroup="DefaultGroup" />
                                <asp:LinkButton runat="server" ID="lbCancel" Text="Cancel"
                                    CausesValidation="false" CssClass="DesignPulseProgram_ASPX CancelButton"
                                    OnClick="butCancel_Click" />
                            </span>
                        </asp:Panel>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel runat="server" ID="upGenerate">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="panGen" CssClass="DesignPulseProgram_ASPX Control Generate">
                        <span class="DesignPulseProgram_ASPX ControlTitle">Setup
                            Experiment</span>
                        <div class="DesignPulseProgram_ASPX Generate ContentWrapper">
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Generate Sample">
                                    Sample</span>
                                <asp:Panel runat="server">
                                    <asp:LinkButton runat="server" Text="Select Sample"
                                        CausesValidation="False" ID="lbSelectSample" OnClick="lbSelectSample_Click"
                                        CssClass="lblSelectSample DesignPulseProgram_ASPX Generate" />
                                    <asp:CustomValidator runat="server" Display="Dynamic"
                                        Text="Please select sample." ValidationGroup="GenerateGroup"
                                        OnServerValidate="cvSample_OnValidate" />
                                </asp:Panel>
                            </div>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator Generate Spectrometer">
                                <span class="UserInputField DesignPulseProgram_ASPX Generate Spectrometer">
                                    Spectrometer</span>
                                <asp:Panel ID="Panel4" runat="server">
                                    <asp:LinkButton runat="server" Text="Select Spectrometer"
                                        CausesValidation="false" ID="lbSelectSpectrometer"
                                        OnClick="lbSelectSpectrometer_Click" />
                                    <asp:CustomValidator runat="server" Display="Dynamic"
                                        Text="Please select spectrometer." ValidationGroup="GenerateGroup"
                                        OnServerValidate="cvSpectrometer_OnValidate" />
                                </asp:Panel>
                            </div>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Generate Name">
                                    Name</span>
                                <asp:TextBox runat="server" ID="tbExperimentName" MaxLength="45"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Generate Name"
                                    Text="DefaultFilename" />
                                <div class="Validator DesignPulseProgram_ASPX Generate Name">
                                    <asp:RequiredFieldValidator ID="rfvNameGen" runat="server"
                                        Display="Dynamic" ControlToValidate="tbExperimentName"
                                        ValidationGroup="GenerateGroup" />
                                    <asp:RegularExpressionValidator ID="revNameGen" runat="server"
                                        Display="Dynamic" ControlToValidate="tbExperimentName"
                                        ValidationGroup="GenerateGroup" />
                                </div>
                            </div>
                            <div class="DesignExperiment LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Generate Remark">
                                    Remark</span>
                                <asp:TextBox ID="tbRemarkGen" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Generate Remark"
                                    Text="Default Remark" TextMode="MultiLine" />
                                <div class="DesignPulseProgram_ASPX Validator">
                                    <asp:RequiredFieldValidator ID="rfvRemarkGen" runat="server"
                                        ControlToValidate="tbRemarkGen" Display="Dynamic"
                                        ValidationGroup="GenerateGroup" />
                                    <asp:RegularExpressionValidator ID="revRemarkGen" runat="server"
                                        ControlToValidate="tbRemarkGen" Display="Dynamic"
                                        ValidationGroup="GenerateGroup" />
                                </div>
                            </div>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Generate Parameters">
                                    Parameters</span>
                                <asp:TextBox ID="tbParameters" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Generate Parameters"
                                    TextMode="SingleLine" />
                                <asp:RegularExpressionValidator ID="revParameters"
                                    runat="server" ControlToValidate="tbParameters"
                                    Display="Dynamic" ValidationGroup="GenerateGroup" />
                            </div>
                            <asp:Button runat="server" Text="Generate" ID="btnGenerate"
                                OnClick="btnGenerate_Click" ValidationGroup="GenerateGroup"
                                CausesValidation="false" CssClass="DesignPulseProgram_ASPX Generate BigButton Control Submit" />
                            <br />
                            <asp:HyperLink runat="server" ID="linkToDownloadMacro"
                                NavigateUrl="~/IdeaNMR/GetMacro.aspx" Text="Download"
                                Visible="false" />
                        </div>
                    </asp:Panel>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="SamplesTable"
                        EventName="Selected" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:UpdatePanel runat="server" ID="upComponents">
                <ContentTemplate>
                    <div runat="server" id="divComponents" class="DesignPulseProgram_ASPX Control Components">
                        <nmr:Components ID="ComponentsList" runat="server"
                            OnAddCommand="ComponentsList_AddCommand" OnComponentAdded="ComponentsList_ComponentAddedCommand"
                            OnSelectedChanged="ComponentsList_SelectedChangedCommand"
                            ListContainerCssClass="DesignPulseProgram_ASPX Components ContentWrapper"
                            Editable="true" TitleCssClass="DesignPulseProgram_ASPX ControlTitle"
                            SubTitleCssClass="DesignPulseProgram_ASPX Components Subtitle"
                            SubListContainerCssClass="DesignPulseProgram_ASPX Components SubList"
                            ComponentCssClass="DesignPulseProgram_ASPX SelectedComponent UserInputField" />
                        <asp:CustomValidator runat="server" ControlToValidate="ComponentsList"
                            OnServerValidate="ComponentIdentifiersUnique_Validate"
                            Display="Dynamic" Text="All Identifiers must be unique"
                            ValidationGroup="DefaultGroup" />
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="WaveShapesTable"
                        EventName="Selected" />
                    <%--<asp:AsyncPostBackTrigger ControlID="CPDsTable" EventName="Selected" />--%>
                    <%--<asp:AsyncPostBackTrigger ControlID="ScriptsTable"
                        EventName="Selected" />--%>
                    <%--<asp:AsyncPostBackTrigger ControlID="butSubmit" EventName="Command" />--%>
                </Triggers>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="upBenchmarks" runat="server">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="panBenchmarks" CssClass="DesignPulseProgram_ASPX Control Benchmarks">
                        <span class="DesignPulseProgram_ASPX ControlTitle">Benchmarks</span>
                        <div class="DesignPulseProgram_ASPX Benchmarks ContentWrapper">
                            <%-----------------------------------------------
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Benchmarks R2Relaxation">
                                    Effective R2 Relaxation Rate</span>
                                <asp:TextBox ID="tbRelaxation" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Benchmarks R2Relaxation"
                                    TextMode="SingleLine" Text="100" />
                                <asp:RequiredFieldValidator ID="rfvRelaxation" runat="server"
                                    ControlToValidate="tbRelaxation" Display="Dynamic"
                                    ValidationGroup="BenchmarksGroup" />
                                <asp:RegularExpressionValidator ID="revRelaxation"
                                    runat="server" ControlToValidate="tbRelaxation"
                                    Display="Dynamic" ValidationGroup="BenchmarksGroup" />
                            </div>
                            -----------------------------------------------%>
                            <%---------------------------------------------
                            MODIFIED BY ALISTAIR IRVINE - 21/05/2011
                            REPLACE RELAXATION RATE WITH ROTATIONAL CORRELATION TIME
                            -----------------------------------------------%>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Benchmarks R2Relaxation">
                                    Rotational Correlation Time (TauC) - Default from Sample</span>
                                <asp:TextBox ID="tbRelaxation" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Benchmarks R2Relaxation"
                                    TextMode="SingleLine" Text="100" />
                                <asp:RequiredFieldValidator ID="rfvRelaxation" runat="server"
                                    ControlToValidate="tbRelaxation" Display="Dynamic"
                                    ValidationGroup="BenchmarksGroup" />
                                <asp:RegularExpressionValidator ID="revRelaxation"
                                    runat="server" ControlToValidate="tbRelaxation"
                                    Display="Dynamic" ValidationGroup="BenchmarksGroup" />
                            </div>
                            <%---------------------------------------------
                            MODIFIED BY ALISTAIR IRVINE - 21/05/2011
                            Default should come from setup parameter 
                            -----------------------------------------------%>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Benchmarks TimeDomains">
                                    Time Domains - Default from Setup (Default = 200)</span>
                                <asp:TextBox ID="tbTimeDomains" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Benchmarks TimeDomains"
                                    TextMode="SingleLine" />
                                <asp:RegularExpressionValidator ID="revTimeDomains"
                                    runat="server" ControlToValidate="tbTimeDomains"
                                    Display="Dynamic" ValidationGroup="BenchmarksGroup" />
                            </div>
                             <%---------------------------------------------
                            MODIFIED BY ALISTAIR IRVINE - 21/05/2011
                            Change from Increments to Spectral Width
                            Default should come from setup parameter 
                            -----------------------------------------------%>
                           <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Benchmarks TimeDomains">
                                    Spectral Width (Hz) (Inverse of Increments) - Default from Setup (Default = 0.0003)</span>
                                <asp:TextBox ID="tbIncrements" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Benchmarks Increments"
                                    TextMode="SingleLine" />
                                <asp:RegularExpressionValidator ID="revIncrements"
                                    runat="server" ControlToValidate="tbIncrements"
                                    Display="Dynamic" ValidationGroup="BenchmarksGroup" />
                            </div>
                             <%---------------------------------------------
                            MODIFIED BY ALISTAIR IRVINE - 21/05/2011
                            Add input for S/N from 1D spectrum
                            Default should come from sample
                            -----------------------------------------------%>
                           <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="UserInputField DesignPulseProgram_ASPX Benchmarks TimeDomains">
                                    S/N from 1D spectrum - Default from Sample (Default = 10?)</span>
                                <asp:TextBox ID="TextBox1" runat="server" MaxLength="2000"
                                    CssClass="UserInputField DesignPulseProgram_ASPX Benchmarks Increments"
                                    TextMode="SingleLine" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1"
                                    runat="server" ControlToValidate="tbIncrements"
                                    Display="Dynamic" ValidationGroup="BenchmarksGroup" />
                            </div>
                            <asp:CustomValidator runat="server" ID="cvAnalytics"
                                OnServerValidate="ValidateAnalytics" Display="Dynamic"
                                ValidationGroup="BenchmarksGroup" Text="Transfer functions on analytics tab can not be parsed." />
                             <%---------------------------------------------
                            ADDED BY ALISTAIR IRVINE - 21/05/2011
                            Add button for setting of default parameters
                            Defaults should come from both the setup and the sample
                            -----------------------------------------------%>
                            <asp:Button runat="server" ID="Button1" CssClass="DesignPulseProgram_ASPX BigButton RunBenchmarks"
                                Text="Set Defaults" OnClick="StartStopBenchmarks"
                                CausesValidation="false" ValidationGroup="BenchmarksGroup" />
                            <asp:Button runat="server" ID="btnRunBenchmarks" CssClass="DesignPulseProgram_ASPX BigButton RunBenchmarks"
                                Text="Run Benchmarks" OnClick="StartStopBenchmarks"
                                CausesValidation="false" ValidationGroup="BenchmarksGroup" />
                           <asp:LinkButton runat="server" ID="lbtnShowHideBenchmarks"
                                OnClick="ShowHideBenchmarks" CssClass="DesignPulseProgram_ASPX minorlink ShowHideBenchmarks"
                                Text="Show Benchmarks Data" CausesValidation="false" />
                            <asp:Label runat="server" ID="lblBenchmarkStatus" Visible="false" />
                            <asp:Image ID="BenchmarkInProgress" CssClass="DesignPulseProgram_ASPX Benchmarks UpdateProgress"
                                ImageUrl="Images/WaitRefresh_Black.gif" runat="server"
                                Visible="false" />
                            <asp:UpdateProgress runat="server" DisplayAfter="300"
                                AssociatedUpdatePanelID="upBenchmarks">
                                <ProgressTemplate>
                                    <asp:Image CssClass="DesignPulseProgram_ASPX Benchmarks UpdateProgress"
                                        ImageUrl="Images/WaitRefresh_Black.gif" runat="server" />
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                            <asp:Timer runat="server" ID="timerBenchmarks" Interval="1000"
                                Enabled="false" OnTick="timerBenchmarks_Tick" />
                        </div>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel runat="server" ID="upVersions">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="panVersions" CssClass="DesignPulseProgram_ASPX Control Versions">
                        <span class="DesignPulseProgram_ASPX ControlTitle">Versions</span>
                        <nmr:VersionsList runat="server" ID="Versions" CssClass="DesignPulseProgram_ASPX" />
                    </asp:Panel>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="butOk" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="upAuthorList" runat="server">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="panAu" CssClass="DesignComponentASPX Control Authors">
                        <span class="DesignPulseProgram_ASPX ControlTitle">Authors</span>
                        <nmr:Authors ID="AuthorsList" runat="server" />
                        <asp:CustomValidator ID="CustomValidator2" runat="server"
                            ControlToValidate="AuthorsList" Style="vertical-align: top"
                            EnableClientScript="False" Text="At lease one author must be added."
                            OnServerValidate="ValidateAuthorsNumber" ValidateEmptyText="false"
                            ValidationGroup="DefaultGroup" Display="Dynamic">
                        </asp:CustomValidator>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
        <asp:Panel runat="server" ID="panLeft" CssClass="DesignPulseProgram_ASPX Fields">
            <asp:UpdatePanel ID="MainForm" runat="server">
                <ContentTemplate>
                    <asp:MultiView runat="server" ID="mvContent" ActiveViewIndex="0">
                        <asp:View runat="server" ID="vDataFields">
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="DesignPulseProgram_ASPX Fields NameLabel">
                                    Name</span>
                                <asp:TextBox ID="tbName" runat="server" CssClass="DesignPulseProgram_ASPX Fields NameText UserInputField" />
                                <div class="DesignPulseProgram_ASPX Validator">
                                    <asp:RequiredFieldValidator runat="server" ControlToValidate="tbName"
                                        Display="Dynamic" ID="rfvName" ValidationGroup="DefaultGroup" />
                                    <asp:RegularExpressionValidator ID="revName" runat="server"
                                        ControlToValidate="tbName" Display="Dynamic" ValidationGroup="DefaultGroup" />
                                </div>
                            </div>
                            <div class="DesignExperiment LabelInputValidator">
                                <span class="DesignExperiment Fields DimLable">Dimensionality</span>
                                <asp:DropDownList ID="ddlDimensionality" runat="server"
                                    CssClass="DesingExperiment Fields Dimensionality UserInputField">
                                    <asp:ListItem Selected="True">Please select</asp:ListItem>
                                    <asp:ListItem>Not Applicable</asp:ListItem>
                                    <asp:ListItem>1D</asp:ListItem>
                                    <asp:ListItem>2D</asp:ListItem>
                                    <asp:ListItem>3D</asp:ListItem>
                                    <asp:ListItem>4D</asp:ListItem>
                                </asp:DropDownList>
                                <div class="DesignExperiment Validator">
                                    <asp:RequiredFieldValidator ID="rfvDimensionality"
                                        runat="server" ControlToValidate="ddlDimensionality"
                                        InitialValue="Please select" Display="Dynamic"
                                        ValidationGroup="DefaultGroup" />
                                </div>
                            </div>
                            <div class="DesignExperiment LabelInputValidator">
                                <span class="DesignExperiment Fields TypeLabel">Type</span>
                                <asp:TextBox ID="tbType" runat="server" CssClass="DesignExperiment Fields TypeText UserInputField" />
                                <div class="DesignExperiment Validator">
                                    <asp:RequiredFieldValidator ID="rfvType" runat="server"
                                        ControlToValidate="tbType" Display="Dynamic" ValidationGroup="DefaultGroup" />
                                    <asp:RegularExpressionValidator ID="revType" runat="server"
                                        ControlToValidate="tbType" Display="Dynamic" ValidationGroup="DefaultGroup" />
                                </div>
                            </div>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <span class="DesignPulseProgram_ASPX Fields RemarkLabel">
                                    Remark</span>
                                <asp:TextBox ID="tbMemo" CssClass="DesignPulseProgram_ASPX Fields RemarkText UserInputField"
                                    runat="server" MaxLength="2000" TextMode="MultiLine" />
                                <div class="DesignPulseProgram_ASPX Validator">
                                    <asp:RequiredFieldValidator ID="rfvMemo" runat="server"
                                        ControlToValidate="tbMemo" Display="Dynamic" ValidationGroup="DefaultGroup" />
                                    <asp:RegularExpressionValidator ID="revMemo" runat="server"
                                        ControlToValidate="tbMemo" Display="Dynamic" ValidationGroup="DefaultGroup" />
                                </div>
                            </div>
                            <div class="DesignPulseProgram_ASPX LabelInputValidator">
                                <act:TabContainer runat="server" ID="tcComponents"
                                    ActiveTabIndex="0">
                                    <act:TabPanel runat="server" HeaderText="Script">
                                        <ContentTemplate>
                                            <asp:TextBox ID="tbScript" runat="server" MaxLength="50000"
                                                CssClass="DesignPulseProgram_ASPX Fields ScriptText UserInputField"
                                                TextMode="MultiLine" />
                                            <div class="DesignPulseProgram_ASPX Validator">
                                                <asp:RegularExpressionValidator ID="revScript" runat="server"
                                                    ControlToValidate="tbScript" Display="Dynamic"
                                                    ValidationGroup="DefaultGroup" />
                                            </div>
                                        </ContentTemplate>
                                        <HeaderTemplate>
                                            <%---------------------------------------------
                                            MODIFIED BY ALISTAIR IRVINE - 20TH MAY 2011
                                            CHANGED LABEL TEXT FROM "Script" to "Setup"
                                            <asp:Label runat="server" Text="Analytics" CssClass="DesignPulseProgram_ASPX Fields AnalyticsLabel" />
                                            -----------------------------------------------%>
                                            <asp:Label runat="server" Text="Setup" CssClass="DesignPulseProgram_ASPX Fields ScriptLabel" />
                                        </HeaderTemplate>
                                    </act:TabPanel>
                                    <act:TabPanel runat="server" HeaderText="Content">
                                        <ContentTemplate>
                                            <asp:TextBox ID="tbContent" runat="server" MaxLength="50000"
                                                CssClass="DesignPulseProgram_ASPX Fields ScriptText UserInputField"
                                                TextMode="MultiLine" />
                                            <div class="DesignPulseProgram_ASPX Validator">
                                                <asp:RegularExpressionValidator ID="revContent" runat="server"
                                                    ControlToValidate="tbContent" Display="Dynamic"
                                                    ValidationGroup="DefaultGroup" />
                                            </div>
                                        </ContentTemplate>
                                        <HeaderTemplate>
                                            <%---------------------------------------------
                                               MODIFIED BY ALISTAIR IRVINE - 25TH NOV 2010
                                               CHANGED LABEL TEXT FROM "Content" TO "Pulse Program"
                                               <asp:Label runat="server" Text="Content" CssClass="DesignPulseProgram_ASPX Fields ScriptLabel" />
                                            -----------------------------------------------%>
                                            <asp:Label runat="server" Text="Pulse Program" CssClass="DesignPulseProgram_ASPX Fields ScriptLabel" />
                                        </HeaderTemplate>
                                    </act:TabPanel>
                                    <act:TabPanel runat="server" HeaderText="Analytics">
                                        <ContentTemplate>
                                            <asp:TextBox ID="tbAnalytics" runat="server" MaxLength="50000"
                                                CssClass="DesignPulseProgram_ASPX Fields ScriptText UserInputField"
                                                TextMode="MultiLine" />
                                            <div class="DesignPulseProgram_ASPX Validator">
                                                <asp:RegularExpressionValidator ID="revAnalytics" runat="server"
                                                    ControlToValidate="tbAnalytics" Display="Dynamic"
                                                    ValidationGroup="DefaultGroup" />
                                            </div>
                                        </ContentTemplate>
                                        <HeaderTemplate>
                                            <%---------------------------------------------
                                            MODIFIED BY ALISTAIR IRVINE - 20TH MAY 2011
                                            CHANGED LABEL TEXT FROM "Transfer Function" to "Simulated FIDs"
                                            <asp:Label runat="server" Text="Analytics" CssClass="DesignPulseProgram_ASPX Fields AnalyticsLabel" />
                                            -----------------------------------------------%>
                                            <asp:Label runat="server" Text="Simulated FIDs" CssClass="DesignPulseProgram_ASPX Fields AnalyticsLabel" />
                                        </HeaderTemplate>
                                    </act:TabPanel>
                                    <act:TabPanel ID="tpOutput" runat="server" HeaderText="Output">
                                        <ContentTemplate>
                                            <asp:Panel ID="panOutput" runat="server">
                                                <asp:Literal runat="server" ID="litOutput" />
                                            </asp:Panel>
                                        </ContentTemplate>
                                        <HeaderTemplate>
                                            <asp:Label runat="server" Text="Output" ForeColor="Black" />
                                        </HeaderTemplate>
                                    </act:TabPanel>
                                </act:TabContainer>
                            </div>
                        </asp:View>
                        <asp:View runat="server" ID="vBenchmarks" OnPreRender="vBenchmarks_PreRender">
                            <asp:UpdatePanel runat="server" ID="upBmResults">
                                <ContentTemplate>
                                    <asp:PlaceHolder runat="server" ID="phBenchmarks" />
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="timerBenchmarks"
                                        EventName="Tick" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </asp:View>
                    </asp:MultiView>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="lbtnShowHideBenchmarks"
                        EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        </asp:Panel>
        <div style="clear: both">
        </div>
    </asp:Panel>
</asp:Content>
